package com.py.korona.db.model;

import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import com.py.korona.db.UriBuilder;
import com.py.korona.db.model.base.Entity;
import com.py.korona.db.model.base.EntityDescription;
import com.py.korona.db.model.base.EntityProperty;

public class GeoplanPerimetrEntity extends Entity {
    public static String             FieldNameGeoplan  = "geoplan";
    public static String             FieldNameGeopoint = "geopoint";
    public static String             FieldNameID       = "_id";
    public static String             TableName         = "geoplanperimetr";
    private static EntityDescription entityDescription_;

    public static EntityDescription entityDescription() {
        if (null == entityDescription_) {
            entityDescription_ = new EntityDescription();
            entityDescription_.addProperty(new EntityProperty(GeoplanPerimetrEntity.FieldNameID, "integer", null, "primary key autoincrement"));
            entityDescription_.addProperty(new EntityProperty(GeoplanPerimetrEntity.FieldNameGeoplan, "integer", null, "not null"));
            entityDescription_.addProperty(new EntityProperty(GeoplanPerimetrEntity.FieldNameGeopoint, "integer", null, "not null"));
        }
        return entityDescription_;
    }

    public static String entityTableName() {
        return GeoplanPerimetrEntity.TableName;
    }

    public static String uriAuthority() {
        return "GeoplanPerimetrContentProvider";
    }

    public static String uriBasePath() {
        return "geoplanperimetr";
    }
    private long geoplan;
    private long geopoint;

    public long getGeoplan() {
        return geoplan;
    }

    public long getGeopoint() {
        return geopoint;
    }

    public void setGeoplan(long geoplan) {
        this.geoplan = geoplan;
    }

    public void setGeopoint(long geopoint) {
        this.geopoint = geopoint;
    }

    @Override
    protected ContentValues contentValues() {
        ContentValues contentValues = new ContentValues();
        contentValues.put(GeoplanPerimetrEntity.FieldNameGeoplan, this.getGeoplan());
        contentValues.put(GeoplanPerimetrEntity.FieldNameGeopoint, this.getGeopoint());
        return contentValues;
    }

    @Override
    protected Uri objectsListUri() {
        return UriBuilder.objectListUri(GeoplanPerimetrEntity.uriAuthority(), GeoplanPerimetrEntity.uriBasePath());
    }

    @Override
    protected void onDataChanged(Cursor cursor) {
        // TODO Auto-generated method stub
    }
}
